
<script src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}" type="text/javascript"></script>

<#include "/common/pagerForm.html">

<form rel="pagerForm" method="post" action="" onsubmit="return navTabSearch(this)">
<input type="hidden" id="advancedStatus" name="advancedStatus"
                value="${condition.advancedStatus!''}" />
    <div class="pageHeader">
        <div class="searchBar defect" >
            <ul class="searchContent">
                <li ><label><@label key="defectCode.C,colon">缺陷编号：</@label></label> <input type="text" class="textInput" name="defectCode" value="${condition.defectCode!''}" /></li>
                <li ><label><@label key="defectText.C,colon">缺陷描述：</@label></label> <input type="text" class="textInput" name="defectText" value="${condition.defectText!''}" /></li>
            </ul>
            <ul class="searchContent">
                <li ><label><@label key="defectLevelCode.C,colon">缺陷等级编号：</@label></label> <input type="text" class="textInput" name="defectLevelCode" value="${condition.defectLevelCode!''}" /></li>
                <li ><label><@label key="responsibilityTypeCode.C,colon">责任类型编号：</@label></label> <input type="text" class="textInput" name="responsibilityTypeCode" value="${condition.responsibilityTypeCode!''}" /></li>
                <li class="query">
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit"><@label key="query.B">查询</@label></button>
                        </div>
                    </div>
                </li>
                <li class="advancedQuery" >            
                <a id="advancedQuery"href="javascript:void(0);"   onclick="openAdvanced(navTab.getCurrentPanel())">
                    <@label key="advancedQuery.C">高级查询</@label>
                </a>
                <span  onclick="openAdvanced(navTab.getCurrentPanel());"></span>            
            </li>
            </ul>
        </div>
    </div>
    <div id="collapsablePanel" style="display:none;"class="pageHeader" >
    <div class="searchBar">
        <ul class="searchContent">
                <li><label><@label key="defectLevelText.C,colon">缺陷等级描述：</@label></label> <input type="text" class="textInput" name="defectLevelText" value="${condition.defectLevelText!''}" /></li>
                <li><label><@label key="responsibilityTypeText.C,colon">责任类型描述：</@label></label> <input type="text" class="textInput" name="responsibilityTypeText" value="${condition.responsibilityTypeText!''}" /></li>
                <li>
                    <label><@label key="customAttribute.C,colon">自定义属性：</@label></label>
                    <select name="attributeCode">
                            <option value=""><@label key="selected_first.C">请选择：</@label></option>
                        <#if defectAttribute??&&(defectAttribute?size>0)>
                        <#list defectAttribute as attribute>
                            <option value="${attribute.attributeCode!''}"
                             <#if condition.attributeCode==attribute.attributeCode>
                                 selected="selected"
                             </#if>
                             >${attribute.attributeCode!''}-${attribute.attributeText!''}</option>
                        </#list>
                        </#if>
                    </select>
                </li>
        </ul>
        <ul class="searchContent">
                <li><label><@label key="repairmethodCode.C,colon">返修方法代码：</@label></label> <input type="text" class="textInput" name="repairmethodCode" value="${condition.repairmethodCode!''}" /></li>
                <li><label><@label key="repairmethodText.C,colon">返修方法描述：</@label></label> <input type="text" class="textInput" name="repairmethodText" value="${condition.repairmethodText!''}" /></li>
                <li>
                    <label><@label key="customAttributeValue.C,colon">自定义属性值：</@label></label>
                    <input name="attributeValue" type="text" value="${condition.attributeValue!''}" />
                </li>
        </ul>
        <ul class="searchContent">
            <li>
                <label>
                    <@label key='createDateTime.C,colon'>创建日期从：</@label>
                </label>
            
                    <input type="text" class="date" readonly="readonly" size="17" max_Date="{maxCreateDateTime}"  name="minCreateDateTime" value="${condition.minCreateDateTime!''}"/>
                    <a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>
                <label>
                    <@label key="to.C,colon">至：</@label>
                </label>
                
                    <input type="text" class="date" readonly="readonly" size="17" min_Date="{minCreateDateTime}" name="maxCreateDateTime"  value="${condition.maxCreateDateTime!''}"/>
                    <a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>
                <label>
                    <@label key='createUser.C,colon'>创建人：</@label>
                </label>
                <input type="text" name="createUser" value="${condition.createUser!''}"/>
            </li>
        </ul>
        <ul class="searchContent">
            <li>
                <label>
                    <@label key='modifyDateTime.C,colon'>修改日期从：</@label>
                </label>
                
                    <input type="text" class="date" readonly="readonly" size="17"  max_Date="{maxModifyDateTime}" name="minModifyDateTime" value="${condition.minModifyDateTime!''}"/>
                    <a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>    
                <label>
                    <@label key="to.C,colon">至：</@label>
                </label>
                
                    <input type="text" class="date" readonly="readonly" size="17" min_Date="{minModifyDateTime}" name="maxModifyDateTime"  value="${condition.maxModifyDateTime!''}"/>
                    <a class="inputDateButton" href="javascript:;">选择</a>
            </li>
            <li>
                <label>
                    <@label key='modifyUser.C,colon'>修改人：</@label>
                </label>
                <input type="text" name="modifyUser" value="${condition.modifyUser!''}"/>
            </li>
        </ul>
    </div>
</div>
</form>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
          <@buttonRight menuCode="DEFECT_ADD" labelKey="add.B" defalutName="新增">
            <li><a class="add" target="dialog" mask="true" width="650" height="440" href="${rc.getContextPath()}/manage/defect/addDefect?navTabId=${navTabId!''}" rel="adddefect" title="<@label key='addDefect.D'>新增缺陷</@label>"><span><@label key="add.B">新增</@label></span>
            </a>
            </li>
            </@buttonRight>
             <@buttonRight menuCode="DEFECT_EDIT" labelKey="edit.B" defalutName="编辑">
            <li><a class="edit" target="dialog" mask="true" width="650" height="540" href="${rc.getContextPath()}/manage/defect/modifyDefect?id={defect_code}&navTabId=${navTabId!''}" rel="editdefect"  title="<@label key='editDefect.D'>编辑缺陷</@label>"><span><@label key="edit.B">编辑</@label></span>
            </a>
            </li>
            </@buttonRight>
             <@buttonRight menuCode="DEFECT_VIEW" labelKey="view.B" defalutName="详情">
            <li><a class="icon" target="dialog" mask="true" width="650" height="540" href="${rc.getContextPath()}/manage/defect/viewDefect?id={defect_code}&navTabId=${navTabId!''}" rel="viewdefect" title="<@label key='viewDefect.D'>故障缺陷</@label>"><span><@label key="view.B">详情</@label></span>
            </a>
            </li>
            </@buttonRight>
             <@buttonRight menuCode="DEFECT_DEL" labelKey="delete.B" defalutName="删除">
            <li><a class="delete" target="selectedTodo" href="${rc.getContextPath()}/manage/defect/deleteDefect?navTabId=${navTabId!''}" postType="string" rel="ids" callback="batchjobAjaxDone"
                title="<@label key='confirmDelDefect.M'>确认要删除选择的缺陷吗？</@label>"><span><@label key="delete.B">删除</@label></span>
            </a>
            </li>
            </@buttonRight>
        </ul>
    </div>
    <table class="table" width="140%" layoutH="165" style="overflow:scroll;">
        <thead>
            <tr>
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="20"><@label key="serialNumber.C">序号</@label></th>
                <th width="100" orderField="defectCode"<#if (page.orderField?? && page.orderField == 'defectCode')>class="${page.orderDirection!''}"</#if>><@label key="defectCode.C">缺陷编号</@label></th>
                <th width="100" orderField="defectText"<#if (page.orderField?? && page.orderField == 'defectText')>class="${page.orderDirection!''}"</#if>><@label key="defectText.C">缺陷描述</@label></th>
                <th width="100" orderField="defectLevelCode"<#if (page.orderField?? && page.orderField == 'defectLevelCode')>class="${page.orderDirection!''}"</#if>><@label key="defectLevelCode.C">缺陷等级编号</@label></th>
                <th width="100" orderField="defectLevelText"<#if (page.orderField?? && page.orderField == 'defectLevelText')>class="${page.orderDirection!''}"</#if>><@label key="defectLevelText.C">缺陷等级描述</@label></th>
                <th width="100" orderField="responsibilityTypeCode"<#if (page.orderField?? && page.orderField == 'responsibilityTypeCode')>class="${page.orderDirection!''}"</#if>><@label key="responsibilityTypeCode.C">责任类型编号</@label></th>
                <th width="100" orderField="responsibilityTypeText"<#if (page.orderField?? && page.orderField == 'responsibilityTypeText')>class="${page.orderDirection!''}"</#if>><@label key="responsibilityTypeText.C">责任类型描述</@label></th>
                <th width="100" orderField="defectTypeCode"<#if (page.orderField?? && page.orderField == 'defectTypeCode')>class="${page.orderDirection!''}"</#if>><@label key="defectTypeCode.C">缺陷类型编号</@label></th>
                <th width="100" orderField="defectTypeText"<#if (page.orderField?? && page.orderField == 'defectTypeText')>class="${page.orderDirection!''}"</#if>><@label key="defectTypeText.C">缺陷类型描述</@label></th>
                <th width="100" orderField="repairmethodCode"<#if (page.orderField?? && page.orderField == 'repairmethodCode')>class="${page.orderDirection!''}"</#if>><@label key="repairmethodCode.C">返修方法代码</@label></th>
                <th width="100" orderField="repairmethodText"<#if (page.orderField?? && page.orderField == 'repairmethodText')>class="${page.orderDirection!''}"</#if>><@label key="repairmethodText.C">返修方法描述</@label></th>
                <th width="50" orderField="backgroundColor"<#if (page.orderField?? && page.orderField == 'backgroundColor')>class="${page.orderDirection!''}"</#if>><@label key="backgroundColor.C">背景色</@label></th>
                <th width="50" orderField="lockFlag"<#if (page.orderField?? && page.orderField == 'lockFlag')>class="${page.orderDirection!''}"</#if>><@label key="lockFlag.C">锁定标记</@label></th>
                <th width="50" orderField="pictureFlag"<#if (page.orderField?? && page.orderField == 'pictureFlag')>class="${page.orderDirection!''}"</#if>><@label key="pictureFlag.C">图形采集标志</@label></th>
            </tr>
        </thead>
        <tbody>
            <#if page??><#if (page.data?size>0)> <#list page.data as defect>
            <tr target="defect_code" rel="${defect.defectCode!''}">
                <td><input name="ids" value="${defect.defectCode!''}" type="checkbox"></td>
                <td>${page.startRow + defect_index}</td>
                <td>${defect.defectCode!''}</td>
                <td>${defect.defectText!''}</td>
                <td>${defect.defectLevelCode!''}</td>
                <td>${defect.defectLevelText!''}</td>
                <td>${defect.responsibilityTypeCode!''}</td>
                <td>${defect.responsibilityTypeText!''}</td>
                <td>${defect.defectTypeCode!''}</td>
                <td>${defect.defectTypeText!''}</td>
                <td>${defect.repairmethodCode!''}</td>
                <td>${defect.repairmethodText!''}</td>
                <td>
                    <div style="width: 15px; height: 15px; margin-top:3px;-moz-border-radius: 10px ; 
                    -webkit-border-radius: 10px; border-radius: 10px; background:${defect.backgroundColor!''};">
                    </div>
                </td>
                <td><#if (defect.lockFlag == 1)><@label key="yes.C">是</@label><#else><@label key="no.C">否</@label></#if></td>
                <td><#if (defect.pictureFlag == 1)><@label key="yes.C">是</@label><#else><@label key="no.C">否</@label></#if></td>
            </tr>
            </#list> <#else>
                <tr >
                <td colspan="7"  class="noData">======<@label key="noListData.C">列表无数据</@label>=====
                </td>
            </tr>
            </#if> <#else>
            <tr >
                <td colspan="7"  class="noData">======<@label key="noListData.C">列表无数据</@label>=====
                </td>
            </tr>
            </#if>
        </tbody>
    </table>
    <#include "/common/panelBar.html">
    
</div>

<script type="text/javascript">
$(function() {
    initAdvancedQuery(navTab.getCurrentPanel());
    
});

</script>